package com.firewolf.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.firewolf.service.NewsService;

@Controller
@RequestMapping("/news")
public class NewsController {

	@Autowired
	private NewsService nService;

	@RequestMapping("/list")
	public String list(Model model) {
		model.addAttribute("nList", nService.list());
		return "list";
	}
	
	@RequestMapping("/del")
	public String del(){
		return "list2";
	}
}
